<template>
    <div :class="[{'success':type==='success'},{'waring':type==='waring'}]" v-if="isShow">
        {{msg}}
    </div>
</template>

<script>
export default {
    data(){
        return {
            msg:'',  //提示信息
            type:'',  //提示信息的类型 success success  waring waring
            isShow:true
        }
    }
}
</script>

<style>
    .success{
        background: green;
    }

    .waring{
        background: orange;
    }
</style>

